package cn.amoqi.springboot.rabbit.rabbit.hello;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Hello2Sender {
    @Autowired
    private AmqpTemplate amqpTemplate;

    public void sender(String msg) {
        amqpTemplate.convertAndSend("hello2", msg);
    }
}
